Implementing feedback directed numa mitigation tuning

ABSTRACT

A method, system and computer program product are provided for implementing feedback directed Non-Uniform Memory Access (NUMA) mitigation tuning in a computer system. During a page frame memory allocation for a process, predefined monitored performance metrics are compared with stored threshold values. Responsive to the compared values, selected use of local memory is dynamically modified during the page frame memory allocation.

FIELD OF THE INVENTION

The present invention relates generally to the data processing field,and more particularly, relates to a method, system and computer programproduct for implementing feedback directed Non-Uniform Memory Access(NUMA) mitigation tuning in a computer system.

DESCRIPTION OF THE RELATED ART

Some large multi-processor computer systems rely on Non-Uniform MemoryAccess (NUMA) with multiple main memories distributed across thecomputer system and physically grouped with sets of multiplemicroprocessors or central processor units (CPUs) and caches intophysical subsystem nodes. Memory access is non-uniform with the accesstime for data stored in local memory in a particular node beingsignificantly less than for data stored in remote memory, such as mainmemory in another node or I/O resource.

Operating system (OS) kernels have evolved to reduce NUMA effects asservers designs have expanded horizontally. Significant problems thesedesigns address include high latencies needed to access memory which isremote to an executing central processing unit (CPU).

For example, a fetch or store of a memory location which is not inmemory local to the executing CPU might take 10s to 100s or more oftimes more cycles to complete. Therefore, as memory for a process isbeing allocated, the kernels favor memory which is local to an executingCPU. This decreases latency, decreases memory fabric traffic andcontention and can make significant performance differences as comparedto random allocations of memory locations.

The natural way for the kernels to implement the decreased latency is toknow which memory is local to a CPU or process and which is remote. If aprocess requires a new memory page, such as for a disk read, or for acontent-ignorant allocation not involving a disk read (usually zeroed),the kernel will allocate from the local memory.

The side effect of this is that now the overall partition's total memoryis not available to any given CPU/process. For example, if a particularpartition includes 4 CPUs, or CPU nodes, and 4 GB of memory, it might beallocated such that each CPU node has 1 GB of local memory. This is nota problem, per se, if end users are aware of this design, and have theability to configure CPU and local memories such that the end users havecomplete control and understanding of how memory is allocated.

However, there are kernel and OS designs that hide or automate the localand remote memory management. In the above example, the end user mightthink a process has 4 GB of memory available to it for allocations.

One existing way around this, is to have a switch that disables favoringlocal memory. Such a switch could be used during periods in whichsingle-threaded applications or system functions would benefit fromusing the entire partition's memory.

A need exists for an effective mechanism for implementing Non-UniformMemory Access (NUMA) mitigation tuning in a computer system.

SUMMARY OF THE INVENTION

Principal aspects of the present invention are to provide a method,system and computer program product for implementing feedback directedNon-Uniform Memory Access (NUMA) mitigation tuning in a computer system.Other important aspects of the present invention are to provide suchmethod, system and computer program product substantially withoutnegative effects and that overcome many of the disadvantages of priorart arrangements.

In brief, a method, system and computer program product are provided forimplementing feedback directed Non-Uniform Memory Access (NUMA)mitigation tuning in a computer system. During a page frame memoryallocation for a process, predefined monitored performance metrics arecompared with stored threshold values. Responsive to the comparedvalues, selected use of local memory is dynamically modified during thepage frame memory allocation.

In accordance with features of the invention, the predefined performancemetrics include monitored partition wide performance metrics ormonitored per process performance metrics. The predefined performancemetrics include, for example, cycles per instruction (CPI) monitoredover a moving time window and page fault rate monitored over a movingtime window. The CPI threshold value and the page fault rate thresholdvalue include system administrator or user selected values.

In accordance with features of the invention, background daemons areprovided on a partition wide or per process basis for monitoring thepredefined performance metrics. Background daemons track cycles perinstruction (CPI) monitored over a moving time window and track pagefault rate monitored over a moving time window.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention together with the above and other objects andadvantages may best be understood from the following detaileddescription of the preferred embodiments of the invention illustrated inthe drawings, wherein:

FIGS. 1A and 1B together provide a block diagram representationillustrating an example system for implementing feedback directedNon-Uniform Memory Access (NUMA) mitigation tuning in accordance withthe preferred embodiment;

FIGS. 2, 3, and 4 together provide a flow chart illustrating exemplaryoperations for implementing feedback directed Non-Uniform Memory Access(NUMA) mitigation tuning in accordance with the preferred embodiment;and

FIG. 5 is a block diagram illustrating a computer program product inaccordance with the preferred embodiment.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

In the following detailed description of embodiments of the invention,reference is made to the accompanying drawings, which illustrate exampleembodiments by which the invention may be practiced. It is to beunderstood that other embodiments may be utilized and structural changesmay be made without departing from the scope of the invention.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the invention. Asused herein, the singular forms “a”, “an” and “the” are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprises”and/or “comprising,” when used in this specification, specify thepresence of stated features, integers, steps, operations, elements,and/or components, but do not preclude the presence or addition of oneor more other features, integers, steps, operations, elements,components, and/or groups thereof.

In accordance with features of the invention, a method, system andcomputer program product are provided for implementing feedback directedNon-Uniform Memory Access (NUMA) mitigation tuning in a computer system.

In accordance with features of the invention, the method, system andcomputer program product provides enhanced performance when a NUMAsystem is running in use or favor local memory mode, but the memoryrequirements for a given process are greater than the local memoryavailable to the process. The method, system and computer programproduct of the invention uses predefined metrics to dynamically modifythe degree to which local memory is used or favored during a mainstorepage frame memory allocation.

Having reference now to the drawings, in FIGS. 1A and 1B, there is shownan example computer system generally designated by the referencecharacter 100 for implementing feedback directed Non-Uniform MemoryAccess (NUMA) mitigation tuning in accordance with the preferredembodiment.

Referring to FIG. 1A, computer system 100 is a NUMA system including aplurality of partitions or physical subsystem nodes 101, 1-M. Eachsubsystem node 101, 1-M includes a plurality of central processor units(CPUs) 102, 1-N coupled to a local memory 104 by a memory controller106.

The local memory 104 includes, for example, cache and dynamic randomaccess memory (DRAM) proximate to the CPUs 102. Each local memory 104 islocal memory for its node 101, and remote memory to all other nodes,101. For example, in subsystem node 101, 1, its local memory 104 isremote to all other nodes, 101, 2-M.

Each subsystem node 101, 1-M includes an inter-node memory bus 108coupled to the memory controller 106 and to the inter-node memory bus108, and memory controller 106 resident on other subsystem nodes 101,1-M.

Referring also to FIG. 1B, computer system 100 includes an operatingsystem 120 including a NUMA kernel 122, a NUMA feedback directedmitigation tuning control program 124 of the preferred embodiment, and aplurality of stored predefined performance metric threshold values 126,such as a cycles per instruction (CPI) threshold value 126 and a pagefaulting threshold value 126. The cycles per instruction (CPI) thresholdvalue 126 and a page faulting threshold value 126 optionally includesystem administrator or user selected values. Computer system 100includes a plurality of background daemons 128 that are provided on apartition wide or on a per process basis for monitoring the predefinedperformance metrics. The background daemons 128 are background computerprograms including a background daemon 130 tracking cycles perinstruction (CPI) over a moving time window, and a background daemon 132tracking page faulting over a moving time window.

Computer system 100 is shown in simplified form sufficient forunderstanding the present invention. The illustrated computer system 100is not intended to imply architectural or functional limitations. Thepresent invention can be used with various hardware implementations andsystems and various other internal hardware devices.

In accordance with features of the invention, ongoing performancemetrics are continuously monitored by the background daemon 130 trackingcycles per instruction (CPI) over a moving time window, and thebackground daemon 132 tracking page faulting over a moving time window.The NUMA kernel 122 operates system 100 in a use or favor local memorymode for NUMA latency prevention.

In accordance with features of the invention, during a page frame memoryallocation for a process, the predefined monitored performance metricsare compared with stored threshold values. Responsive to the comparedvalues, selected use of local memory is dynamically modified during thepage frame memory allocation.

Referring to FIGS. 2, 3, and 4, there are shown exemplary operations forimplementing feedback directed Non-Uniform Memory Access (NUMA)mitigation tuning in accordance with the preferred embodiment. Theexample NUMA mitigation tuning operations begin indicated at a block 202and are performed during a page frame memory allocation for a process.

In FIG. 2, as indicated at a decision block 204 checking for a freeframe being available in local memory is performed. When a free framebeing available in local memory is identified, the free frame is used asindicated at a block 206. Otherwise when a free frame is not availablein local memory, checking for a free frame being available in remotememory is performed as indicated at a decision block 208.

When a free frame being available in remote memory is identified atdecision block 208, then operations continue following entry point A inFIG. 3. Otherwise when a free frame is not available in remote memory,then operations continue following entry point B in FIG. 4.

Referring now to FIG. 3, comparing the monitored ongoing CPI with thestored threshold value is performed as indicated at a decision block310. Responsive to the monitored ongoing CPI being less than the storedCPI threshold value 126, the free frame in remote memory is used asindicated at a block 312.

Otherwise when monitored ongoing CPI is greater than the stored CPIthreshold value 126, comparing the monitored ongoing page fault ratewith the stored page fault threshold value is performed as indicated ata decision block 314. When the ongoing page fault rate is less than thestored page fault threshold value, a page is stolen from local memory asindicated at a block 316. When the ongoing page fault rate is greaterthan the stored page fault threshold value, a page is stolen from remotememory as indicated at a block 318.

Referring to FIG. 4, when a free frame is not available in remotememory, then comparing the monitored ongoing CPI with the storedthreshold value is performed as indicated at a decision block 410.Responsive to the monitored ongoing CPI being less than the stored CPIthreshold value 126, a page is stolen from remote memory as indicated ata block 412. Otherwise when monitored ongoing CPI is greater than thestored CPI threshold value 126, comparing the monitored ongoing pagefault rate with the stored page fault threshold value is performed asindicated at a decision block 414. When the ongoing page fault rate isless than the stored page fault threshold value, a page is stolen fromlocal memory as indicated at a block 416. When the ongoing page faultrate is greater than the stored page fault threshold value, a page isstolen from remote memory as indicated at a block 418.

Referring now to FIG. 5, an article of manufacture or a computer programproduct 500 of the invention is illustrated. The computer programproduct 500 is tangibly embodied on a non-transitory computer readablestorage medium that includes a recording medium 502, such as, a floppydisk, a high capacity read only memory in the form of an optically readcompact disk or CD-ROM, a tape, or another similar computer programproduct. Recording medium 502 stores program means 504, 506, 508, and510 on the medium 502 for carrying out the methods for implementingfeedback directed Non-Uniform Memory Access (NUMA) mitigation tuning ofthe preferred embodiment in the system 100 of FIGS. 1A and 1B.

A sequence of program instructions or a logical assembly of one or moreinterrelated nodes defined by the recorded program means 504, 506, 508,and 510, direct the computer system 100 for implementing feedbackdirected Non-Uniform Memory Access (NUMA) mitigation tuning of thepreferred embodiment.

While the present invention has been described with reference to thedetails of the embodiments of the invention shown in the drawing, thesedetails are not intended to limit the scope of the invention as claimedin the appended claims.

What is claimed is:
 1. A method for implementing feedback directedNon-Uniform Memory Access (NUMA) mitigation tuning in a computer systemcomprising: storing predefined performance metric threshold values;monitoring predefined performance metrics; performing a page framememory allocation for a process by comparing said monitored predefinedperformance metrics with said stored monitoring predefined performancemetric threshold values; and dynamically modifying selected use of localmemory for the page frame memory allocation responsive to the comparedvalues.
 2. The method as recited in claim 1 wherein storing predefinedperformance metric threshold values includes storing a cycles perinstruction (CPI) threshold value.
 3. The method as recited in claim 1wherein storing predefined performance metric threshold values includesstoring a page fault threshold value.
 4. The method as recited in claim1 wherein monitoring predefined performance metrics includes providing abackground daemon for tracking cycles per instruction (CPI) over amoving time window.
 5. The method as recited in claim 1 whereinmonitoring predefined performance metrics includes providing abackground daemon for tracking page faulting over a moving time window.6. The method as recited in claim 1 wherein monitoring predefinedperformance metrics includes selectively monitoring predefinedperformance metrics for a process or a partition in the computer system.7. The method as recited in claim 1 wherein dynamically modifyingselected use of local memory for the page frame memory allocationresponsive to the compared values includes identifying a free frame inlocal memory and using the identified free frame in local memory.
 8. Themethod as recited in claim 1 wherein dynamically modifying selected useof local memory for the page frame memory allocation responsive to thecompared values includes responsive to not identifying a free frame inlocal memory, and identifying a free frame being available in remotememory, comparing a monitored ongoing cycles per instruction (CPI) witha stored CPI threshold value; and using a free frame from remote memoryresponsive to the monitored ongoing CPI being less than the stored CPIthreshold value; and responsive to the monitored ongoing CPI beinggreater than the stored CPI threshold value, comparing a monitoredongoing page fault rate with a stored page fault threshold value, andstealing a page from local memory or stealing a page from remote memoryresponsive to the compared page fault values.
 9. The method as recitedin claim 1 wherein dynamically modifying selected use of local memoryfor the page frame memory allocation responsive to the compared valuesincludes responsive to not identifying a free frame in local memory, andnot identifying a free frame being available in remote memory, comparinga monitored ongoing cycles per instruction (CPI) with a stored CPIthreshold value; and stealing a page from remote memory responsive tothe monitored ongoing CPI being less than the stored CPI thresholdvalue; and responsive to the monitored ongoing CPI being greater thanthe stored CPI threshold value, comparing a monitored ongoing page faultrate with a stored page fault threshold value, and stealing a page fromlocal memory or stealing a page from remote memory responsive to thecompared page fault values.
 10. A system for implementing feedbackdirected Non-Uniform Memory Access (NUMA) mitigation tuning in acomputer system comprising: a local memory; a remote memory a centralprocessor unit (CPU) coupled to said local memory and said remotememory; a NUMA feedback directed mitigation tuning control computerprogram product tangibly embodied on a non-transitory computer readablestorage medium, said NUMA feedback directed mitigation tuning controlcomputer program product performing a page frame memory allocation for aprocess by comparing monitored ongoing predefined performance metricswith stored predefined performance metric threshold values; anddynamically modifying selected use of local memory for the page framememory allocation responsive to the compared values.
 11. The system asrecited in claim 10 includes a background daemon for monitoringpredefined performance metrics including tracking cycles per instruction(CPI) over a moving time window.
 12. The system as recited in claim 10includes a background daemon for monitoring predefined performancemetrics including tracking page faulting over a moving time window. 13.The system as recited in claim 10 includes a background daemonselectively monitoring predefined performance metrics for a process or apartition in the computer system.
 14. The system as recited in claim 10wherein said stored predefined performance metric threshold valuesincludes a cycles per instruction (CPI) threshold value; and a pagefault threshold value.
 15. A computer program product for implementingfeedback directed Non-Uniform Memory Access (NUMA) mitigation tuning ina computer system, said computer program product tangibly embodied in anon-transitory machine readable medium, said computer program productincluding instructions executed by the computer system to cause thecomputer system to perform the steps comprising: storing predefinedperformance metric threshold values; monitoring predefined performancemetrics; performing a page frame memory allocation for a process bycomparing said monitored predefined performance metrics with said storedmonitoring predefined performance metric threshold values; anddynamically modifying selected use of local memory for the page framememory allocation responsive to the compared values.
 16. The computerprogram product as recited in claim 15 wherein storing predefinedperformance metric threshold values includes storing a cycles perinstruction (CPI) threshold value.
 17. The computer program product asrecited in claim 15 wherein storing predefined performance metricthreshold values includes storing a page fault threshold value.
 18. Thecomputer program product as recited in claim 15 wherein monitoringpredefined performance metrics includes providing a background daemonfor tracking cycles per instruction (CPI) over a moving time window. 19.The computer program product as recited in claim 15 wherein monitoringpredefined performance metrics includes providing a background daemonfor tracking page fault rate over a moving time window.
 20. The computerprogram product as recited in claim 15 wherein monitoring predefinedperformance metrics includes selectively monitoring predefinedperformance metrics for a process or for a partition in the computersystem.